import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { bus, setupApp, preloadApp, startApp, destroyApp } from 'wujie';

if (environment.production) {
  enableProdMode();
}

setupApp({
  name: 'Angular',
  url: 'http://localhost:4201/ngSubApp/',
  exec: true,
  el: '#wujie',
  sync: true,
});

platformBrowserDynamic()
  .bootstrapModule(AppModule)
  .catch((err) => console.error(err));
